package com.example.understandvideo.service.transcode;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@Data// lombok注解，给字段添加getter和setter
@XmlAccessorType(XmlAccessType.FIELD)// 映射所有的字段
@XmlRootElement(name = "logodetecter")// XML根节点名称，此处为user
@AllArgsConstructor
@NoArgsConstructor
@XmlType(propOrder = {"mosaicenabled"
        , "mosaictype"
        , "mosaicgrain"
        , "overwriteenabled"
        , "overwritelogouri"
})
public class Logodetecter {
    String mosaicenabled;
    String mosaictype;
    String mosaicgrain;
    String overwriteenabled;
    String overwritelogouri;

    public static Logodetecter getDefault(String logoPath) {
        String logo = StringUtils.isNotEmpty(logoPath) ? logoPath : "";
        return new Logodetecter("0", "3", "0", "0", logo);
    }
}
